/*** Eclipse Class Decompiler plugin, copyright (c) 2012 Chao Chen (cnfree2000@hotmail.com) ***/
package com.qihoopp.qcoinpay;

import android.app.Activity;
import android.view.View;
import android.view.ViewGroup.LayoutParams;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.ImageView.ScaleType;
import android.widget.LinearLayout;
import android.widget.LinearLayout.LayoutParams;
import android.widget.RelativeLayout;
import android.widget.RelativeLayout.LayoutParams;
import android.widget.TextView;

public final class bc {
    public Activity a;
    n b;
    private bi j;
    private View k;
    public ah c;
    public aj d;
    public RelativeLayout e;
    public FrameLayout f;
    public bg g;
    public RelativeLayout h;
    private t l;
    public ak i;

    public bc(Activity paramActivity, t paramt, n paramn) {
        this.a = paramActivity;
        this.l = paramt;
        this.b = paramn;
        this.j = bi.a(paramActivity);
        (paramActivity = this).f = new FrameLayout(paramActivity.a);
        paramActivity.e = new RelativeLayout(paramActivity.a);
        paramActivity.f.addView(paramActivity.e);
        paramt = new TextView(paramActivity.a);
        paramActivity.j.a(paramt, "bg_titlebtn_nor.9.png", "bg_titlebtn_press.9.png", "bg_titlebtn_nor.9.png");
        paramt.setTextColor(-1);
        paramt.setTextSize(13.0F);
        paramt.setGravity(17);
        paramt.setId(cz.a());
        paramt.setText(a.a(b.p));
        paramn = new RelativeLayout.LayoutParams(cz.a(paramActivity.a, 55.5F), cz.a(paramActivity.a, 32.5F));
        paramt.setLayoutParams(paramn);
        (paramt = new af(paramActivity.a, paramt)).setId(cz.a());
        paramt.a(new ao(paramActivity));
        (paramn = new RelativeLayout.LayoutParams(-1, cz.a(paramActivity.a, 48.5F))).addRule(10, -1);
        paramActivity.e.addView(paramt, paramn);
        (paramn = new ImageView(paramActivity.a)).setId(cz.a());
        paramn.setScaleType(ImageView.ScaleType.FIT_XY);
        paramn.setImageDrawable(paramActivity.j.a("img_titleshade.png"));
        (localObject1 = new RelativeLayout.LayoutParams(-1, -2)).addRule(3, paramt.getId());
        paramActivity.e.addView(paramn, (ViewGroup.LayoutParams) localObject1);
        (paramt = new RelativeLayout.LayoutParams(-1, cz.a(paramActivity.a, 35.5F))).addRule(3, paramn.getId());
        paramActivity.i = new ak(paramActivity.a);
        (paramn = paramActivity.i).a = new LinearLayout(paramn.d);
        Object localObject1 = bi.a(paramn.d);
        paramn.a.setBackgroundDrawable(((bi) localObject1).a("bg_dealinfo.png"));
        paramn.c = new LinearLayout(paramn.d);
        (localObject2 = new TextView(paramn.d)).setTextSize(16.0F);
        ((TextView) localObject2).setText(a.a(b.Y));
        ((TextView) localObject2).setTextColor(-7829368);
        paramn.b = new TextView(paramn.d);
        paramn.b.setTextSize(16.0F);
        paramn.b.setTextColor(-13421773);
        paramn.b.setSingleLine();
        paramn.c.addView((View) localObject2);
        paramn.c.addView(paramn.b);
        (localObject3 = new LinearLayout.LayoutParams(-2, -2)).gravity = 16;
        paramn.a.addView(paramn.c, (ViewGroup.LayoutParams) localObject3);
        (paramn = paramn.a).setId(cz.a());
        paramActivity.e.addView(paramn, paramt);
        (paramt = new ImageView(paramActivity.a)).setId(cz.a());
        paramt.setScaleType(ImageView.ScaleType.FIT_XY);
        paramt.setImageDrawable(paramActivity.j.a("img_dealshade.png"));
        (localObject1 = new RelativeLayout.LayoutParams(-1, -2)).addRule(3, paramn.getId());
        paramActivity.e.addView(paramt, (ViewGroup.LayoutParams) localObject1);
        paramActivity.d = new aj(paramActivity.a, paramActivity.b);
        paramActivity.d.c.setId(cz.a());
        paramn = paramActivity;
        (localObject1 = new LinearLayout(paramn.a)).setOrientation(1);
        Object localObject2 = new RelativeLayout(paramn.a);
        Object localObject3 = new LinearLayout.LayoutParams(-1, -1);
        ((LinearLayout) localObject1).addView((View) localObject2, (ViewGroup.LayoutParams) localObject3);
        localObject3 = new RelativeLayout(paramn.a);
        RelativeLayout.LayoutParams localLayoutParams = new RelativeLayout.LayoutParams(-1, -1);
        ((RelativeLayout) localObject3).addView(paramn.d.c, localLayoutParams);
        paramn = new RelativeLayout.LayoutParams(-1, -1);
        ((RelativeLayout) localObject2).addView((View) localObject3, paramn);
        paramn = (n) localObject1;
        (localObject1 = new RelativeLayout.LayoutParams(-1, -1)).addRule(3, paramt.getId());
        paramActivity.e.addView(paramn, (ViewGroup.LayoutParams) localObject1);
        paramActivity.c = new ah(paramActivity.a);
        paramActivity.c.a(a.a(b.e));
        paramActivity.f.addView(paramActivity.c);
    }

    public final void a(View paramView, boolean paramBoolean) {
        if (this.h == null)
            this.h = new RelativeLayout(this.a);
        if (paramBoolean) {
            this.h.setBackgroundColor(-2013265920);
            this.h.setOnTouchListener(new ar(this));
        }
        else {
            this.h.setBackgroundColor(-2013265920);
            this.h.setOnTouchListener(new as(this));
        }
        if ((paramBoolean = (RelativeLayout.LayoutParams) paramView.getLayoutParams()) == null) {
            paramBoolean = this.f.getWidth();
            boolean bool = this.f.getHeight();
            paramBoolean = (paramBoolean > bool) ? bool * true / 4 : paramBoolean * true / 4;
            (paramBoolean = new RelativeLayout.LayoutParams(paramBoolean, -2)).addRule(13, -1);
        }
        this.f.removeView(this.c);
        this.f.removeView(this.h);
        this.h.removeAllViews();
        this.h.addView(paramView, paramBoolean);
        this.f.addView(this.h);
    }

    public final void a() {
        if (this.h == null)
            return;
        this.f.removeView(this.h);
    }

    public final void a(View paramView) {
        if (this.k == null) {
            this.f.addView(paramView);
            this.k = paramView;
        }
        else if (paramView != this.k) {
            this.f.removeView(this.k);
            this.f.addView(paramView);
            this.k = paramView;
        }
        this.e.setVisibility(4);
        this.k.setVisibility(0);
    }

    public final void b() {
        if (this.k == null)
            return;
        this.k.setVisibility(8);
        this.e.setVisibility(0);
    }
}